let $ = layui.jquery;
let jQuery=$;
let SettingData = {};//配置文件参数
let SeleteData = {};//筛选参数
let current =1;
let raw = '';//排序
let InitData={};
let table_config = {
    "header": {
        "button": [
            {
                "title": "新增",
                "icon": "icon-add-bold",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/menu/add/",
                "where": "",
                "width": 700,
                "height": 0,
                "node": "admin:menu:add"
            }
        ],
        "tab": [],
        "search": {
            "datetime": [],
            "like": ""
        },
        "sum": []
    },
    "left": {
        "status": 2,
        "title": null,
        "options_id": null,
        "key_field": "value",
        "show_field": "label",
        "field": "id",
        "type": 1,
        "url": {
            "title": "",
            "list": "/common/options/leftlists/?num=",
            "add": "",
            "edit": "",
            "delete": "",
            "width": "",
            "height": ""
        }
    },
    "source": "menu_type",
    "table": {
        "button": [
            {
                "title": "修改",
                "icon": "icon-edit",
                "btn_class": "btn_theme_1",
                "is_drop": 2,
                "type": "window",
                "url": "/admin/menu/edit/?id={id}",
                "where": "",
                "width": 700,
                "height": 0,
                "node": "admin:menu:edit"
            },
            {
                "title": "删除",
                "icon": "icon-ashbin",
                "btn_class": "btn_theme_2",
                "is_drop": 2,
                "type": "ajax",
                "url": "/admin/menu/delete/?id={id}",
                "where": null,
                "width": 0,
                "height": 0,
                "node": "admin:menu:delete"
            }
        ],
        "style": 3,
        "parent_id": "parent_id",
        "parent_name": "title",
        "limit": 0,
        "tab_sum": "",
        "page": false,
        "elem": "datatable",
        "height": "full-85",
        "update": "/admin/menu/update_field/",
        "url": "/admin/menu/index/",
        "cols": [
            {
                "id": "1713406623_15_2",
                "field": "title",
                "title": "名称",
                "width": "200",
                "search": "",
                "minWidth": "200"
            },
            {
                "id": "1713406803_15_2",
                "field": "type",
                "title": "类型",
                "width": "120",
                "options": "menu_type",
                "show_rule": "",
                "minWidth": "120"
            },
            {
                "id": "1713406617_15_1",
                "hide": 1,
                "field": "parent_id",
                "title": "上级",
                "width": "120",
                "update": "",
                "minWidth": "120"
            },
            {
                "id": "1713406834_15_7",
                "align": "left",
                "field": "href",
                "title": "访问路径",
                "update": ""
            },
            {
                "id": "1718773636_15_8",
                "field": "power_node",
                "title": "授权标识",
                "update": ""
            },
            {
                "id": "1713692284_15_8",
                "field": "sort",
                "title": "排序",
                "width": "120",
                "update": "input",
                "minWidth": "120"
            },
            {
                "id": "1717596648_15_5",
                "field": "status",
                "title": "是否可用",
                "width": "120",
                "update": "switch",
                "minWidth": "120"
            }
        ]
    }
};
let form_config = {
    detail:'/admin/menu/detail/',
    add:'/admin/menu/add/',
    edit:'/admin/menu/edit/',
    data:{
    "parent_id": "0",
    "title": "",
    "icon": "",
    "type": "1",
    "position": "1",
    "is_drop": "2",
    "btn_class": "",
    "open_type": "open",
    "width": "",
    "height": "",
    "href": "",
    "power_node": "",
    "where": "",
    "sort": "1"
},
    label_width:'',
    form_label:'form_right',
    onclick:[
    {
        "tag": "radio",
        "field": "type",
        "required": 2,
        "event_val": "2,3",
        "event_type": "in",
        "event_field": "href"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "3",
        "event_type": "=",
        "event_field": "position"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "3",
        "event_type": "=",
        "event_field": "is_drop"
    },
    {
        "tag": "radio",
        "field": "type",
        "event_val": "3",
        "event_type": "=",
        "event_field": "where"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "3",
        "event_type": "=",
        "event_field": "btn_class"
    },
    {
        "tag": "radio",
        "field": "type",
        "required": 1,
        "event_val": "2,3",
        "event_type": "in",
        "event_field": "open_type"
    },
    {
        "required": 2,
        "event_val": "2,3",
        "event_type": "in",
        "event_field": "power_node",
        "field": "type",
        "tag": "radio"
    },
    {
        "tag": "radio",
        "field": "open_type",
        "required": 1,
        "event_val": "window",
        "event_type": "=",
        "event_field": "width"
    },
    {
        "tag": "radio",
        "field": "open_type",
        "required": 1,
        "event_val": "window",
        "event_type": "=",
        "event_field": "height"
    }
],
};
